Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to nixpkgs.lib #162

Closed
wants to merge 2 commits into from
Closed

switch to nixpkgs.lib #162

wants to merge 2 commits into from

Conversation

figsoda
Copy link
Contributor

@figsoda figsoda commented May 29, 2023

No description provided.

@Kranzes
Copy link

Kranzes commented May 29, 2023

What's the benefit?

@figsoda
Copy link
Contributor Author

figsoda commented May 29, 2023

using ?dir=lib requires downloading the entire nixpkgs tarball

@Kranzes
Copy link

Kranzes commented May 29, 2023

I see, will lazy-trees fix this?

@figsoda
Copy link
Contributor Author

figsoda commented May 29, 2023

I doubt, but don't take my word for it #162 (comment)

@roberth
Copy link
Member

roberth commented May 30, 2023

I see, will lazy-trees fix this?

It can and I think it should, but it's actually an orthogonal issue that's only blocked on lazy trees for development reasons. Taking away the parent directory does change the flake semantics, but I think that's for the better. To be continued.

This is going to take a while so I'm open to changing the input until git/github tree fetching is widely available, so I'm warming up to the idea of doing this, having rejected it before.

I'll add a comment that explains things.

@roberth
Copy link
Member

roberth commented May 31, 2023

nixpkgs.lib contains an outdated version of lib somehow. Maybe its updater is broken.

@figsoda
Copy link
Contributor Author

figsoda commented May 31, 2023

seems like the actions has been failing, I opened nix-community/nixpkgs.lib#4 to try to fix that

@roberth
Copy link
Member

roberth commented May 31, 2023

I've thought about it for a bit and I really don't want a fragile Action to be in the critical path between flake-parts and module system updates.
You are free to push this in manually with follows, but it's not something I wish to push as the default.
Something pinned like an Hercules CI Effect would be an improvement, but I'd rather put my effort into solving the root cause, which is git tree support in fetchTree (ironic, considering the naming).

@roberth roberth closed this May 31, 2023
@figsoda figsoda deleted the lib branch May 31, 2023 18:53
@Kranzes
Copy link

Kranzes commented May 31, 2023

If you are using flake-parts then you probably are also using nixpkgs, just use inputs.flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; and it will reuse your nixpkgs.

@figsoda
Copy link
Contributor Author

figsoda commented May 31, 2023

yep that's already what I'm doing for my projects, I just noticed it trying to download the whole nixpkgs while debugging #160

@bb010g
Copy link

bb010g commented Aug 18, 2023

Using nixpkgs.lib also breaks our //lib.nix version check, at least until nix-community/nixpkgs.lib#5 is merged in our minimum supported nixpkgs.lib version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants